﻿using System.ComponentModel;

using VSTalk.Engine.Core.XmppCommunication.Services.ContactManager;
using VSTalk.Tools;

namespace VSTalk.Engine.ViewModel.Editors.ContactEditor
{
    public class ContactInfo : IContactInfo, INotifyPropertyChanged
    {
        private string _name;
        private string _server;

        public string Name
        {
            get { return _name; }
            set
            {
                if (Equals(value, _name)) return;
                _name = value;
                PropertyChanged.Notify(() => Name);
            }
        }

        public string Server
        {
            get { return _server; }
            set
            {
                if (Equals(value, _name)) return;
                _server = value;
                PropertyChanged.Notify(() => Server);
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}